/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.manager.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.xd.domain.bo.DocumentFlowCancelRequestFlowBO;
import com.xy.biz.xd.domain.query.DocumentFlowCancelRequestFlowQuery;
import com.xy.biz.xd.domain.converter.DocumentFlowCancelRequestFlowConverter;
import com.xy.biz.xd.manager.DocumentFlowCancelRequestFlowManager;
import com.xy.biz.xd.dao.DocumentFlowCancelRequestFlowDao;

/**
 *
 *
 * @author zgy
 * @date 2021-6-17
 */
@Service
public class DocumentFlowCancelRequestFlowManagerImpl implements DocumentFlowCancelRequestFlowManager {

    @Autowired
    private DocumentFlowCancelRequestFlowDao documentFlowCancelRequestFlowDao;

    @Override
    public int saveDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowBO documentFlowCancelRequestFlowBO) {
        return documentFlowCancelRequestFlowDao.saveDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowConverter.toPO(documentFlowCancelRequestFlowBO));
    }

    @Override
    public int saveAllDocumentFlowCancelRequestFlow(Collection<DocumentFlowCancelRequestFlowBO> collection) {
        return documentFlowCancelRequestFlowDao.saveAllDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowConverter.toPO(collection));
    }

    @Override
    public int updateDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowBO documentFlowCancelRequestFlowBO) {
        return documentFlowCancelRequestFlowDao.updateDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowConverter.toPO(documentFlowCancelRequestFlowBO));
    }

    @Override
    public int deleteDocumentFlowCancelRequestFlow(Long documentFlowCancelRequestFlowId) {
        return documentFlowCancelRequestFlowDao.deleteDocumentFlowCancelRequestFlow(documentFlowCancelRequestFlowId);
    }

    @Override
    public DocumentFlowCancelRequestFlowBO getDocumentFlowCancelRequestFlow(Long documentFlowCancelRequestFlowId) {
        return DocumentFlowCancelRequestFlowConverter.fromPO(documentFlowCancelRequestFlowDao.getDocumentFlowCancelRequestFlow(documentFlowCancelRequestFlowId));
    }

    @Override
    public DocumentFlowCancelRequestFlowBO getDocumentFlowCancelRequestFlowByDocumentFlowId(Long documentFlowId) {
        return DocumentFlowCancelRequestFlowConverter.fromPO(documentFlowCancelRequestFlowDao.getDocumentFlowCancelRequestFlowByDocumentFlowId(documentFlowId));
    }

    @Override
    public List<DocumentFlowCancelRequestFlowBO> listDocumentFlowCancelRequestFlowById(Collection<Long> collection) {
        return DocumentFlowCancelRequestFlowConverter.fromPO(documentFlowCancelRequestFlowDao.listDocumentFlowCancelRequestFlowById(collection));
    }

    /**
     * 查找多个
     *
     * @param collection 标识集合
     */
    @Override
    public List<DocumentFlowCancelRequestFlowBO> listDocumentFlowCancelRequestFlowByDocumentFlowId(Collection<Long> collection) {
        return DocumentFlowCancelRequestFlowConverter.fromPO(documentFlowCancelRequestFlowDao.listDocumentFlowCancelRequestFlowByDocumentFlowId(collection));
    }

    @Override
    public List<DocumentFlowCancelRequestFlowBO> listDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowQuery query) {
        return DocumentFlowCancelRequestFlowConverter.fromPO(documentFlowCancelRequestFlowDao.listDocumentFlowCancelRequestFlow(query));
    }

    @Override
    public int countDocumentFlowCancelRequestFlow(DocumentFlowCancelRequestFlowQuery query) {
        return documentFlowCancelRequestFlowDao.countDocumentFlowCancelRequestFlow(query);
    }

}
